﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    主题讨论
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("AdminTopUc", "主题讨论"); %>
    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="table03">
        <% using (Ajax.BeginForm("ForumsListUc", new AjaxOptions { HttpMethod = "Get", UpdateTargetId = "listDiv" }))
           {%>
        <tr class="box06">
            <td width="9%" height="27" align="center">
                <div align="right">
                    关键字：</div>
            </td>
            <td width="13%" align="center" class="bg3">
                <div align="left">
                    <input name="search" type="text" size="18"/>
                </div>
            </td>
            <td width="58%" align="center" class="bg3">
                <div align="left">
                    <input type="submit"  value="搜索"/>
                </div>
            </td>
            <td width="20%" align="center" class="bg3">
                <div align="right">
                    <input type="button" id="btnAdd" value="新增" />
                </div>
            </td>
        </tr>
        <% } %>
    </table>
    <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
        <tr>
            <td height="5" bgcolor="#FFFFFF">
            </td>
        </tr>
    </table>
    <div id="listDiv">
        <% Html.RenderAction("ForumsListUc"); %>
    </div>
     <div id="editDiv" title="编辑讨论区">
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#editDiv").dialog({
                autoOpen: false,
                height: 250,
                width: 550,
                modal: true,
                close: function () {
                    window.location.reload();
                }
            });


            $("#btnAdd")
			.click(function () {
			    $("#editDiv").html("loading...");
			    $("#editDiv").load(appRoot + 'AdminInteraction/ForumsEditUc/?rd=' + rdTime());
			    $("#editDiv").dialog("open");
			});

        });

        var editClickA = function (id) {
            $("#editDiv").html("loading...");
            $("#editDiv").load(appRoot + 'AdminInteraction/ForumsEditUc/' + id + "?rd=" + rdTime());
            $("#editDiv").dialog("open");
        };

    </script>
</asp:Content>
